package steveshrader.budget.server.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Vendor {
        @PrimaryKey
        @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
        private Long id;

        @Persistent
        private String userId;
        
        @Persistent
        private String name;
        
        @Persistent
        private String lastExpenseType;
        
        @Persistent
        private String lastPaymentType;
        
        
        public Vendor(String userId, String name, String lastExpenseType, String lastPaymentType) {
                this.userId = userId;
                this.name = name;
                this.lastExpenseType = lastExpenseType;
                this.lastPaymentType = lastPaymentType;
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public String getLastExpenseType() {
                return lastExpenseType;
        }

        public void setLastExpenseType(String lastExpenseType) {
                this.lastExpenseType = lastExpenseType;
        }

        public String getLastPaymentType() {
                return lastPaymentType;
        }

        public void setLastPaymentType(String lastPaymentType) {
                this.lastPaymentType = lastPaymentType;
        }
        
        public Long getId() {
                return id;
        }
        
        public String getUserId() {
                return userId;
        }
}